define(function(){
    // 定义接口函数main, 外部调用mai函数即可
    function init(){
        var all_div = document.getElementsByTagName("div");
        var all_pre = document.getElementsByTagName("pre");
        var logoLabel = document.getElementsByClassName("logoName");
        for(var i=0; i<all_div.length; i++){
            
            if(all_div[i].getAttribute("uuid")){
                for(var n=0; n<all_pre.length; n++){
                    if(all_pre[n].getAttribute("uuid")){
                        if(all_div[i].getAttribute("uuid") == all_pre[n].getAttribute("uuid") ){
                            // alert(all_div[i].getAttribute("uuid"));
                            all_div[i].appendChild(all_pre[n]);
                            all_pre[n].style.display = '';
                        }
                    }   
                }
            }
        }
        // 根据文件名设置logo名字
        if(logoLabel){
            var url_path = window.location.href;
            var url_part = url_path.split('/');
            var url_file = url_part[url_part.length-1];
            var url_file_part = url_file.split('.');
            var file_name = url_file_part[0];
            logoLabel[0].innerHTML = file_name;
        }
        
    }
        
    init();

})